package org.waddy.framework.pub.util.common;

public class ByteUtil {

	/**
	 * 拼接两个字节数组
	 * @param b1
	 * @param b2
	 * @return 拼接后的字节数组
	 */
	public static byte[] join(byte[] b1, byte[] b2){
		byte[] bytes = new byte[b1.length+b2.length];
		  System.arraycopy(b1,0,bytes,0,b1.length);
		  System.arraycopy(b2,0,bytes,b1.length,b2.length);
		return bytes;
	}
	
	/**
	 * 判断一个字节数组是否为空
	 * @param bytes
	 * @return boolean
	 */
	public static boolean isBlank(byte[] bytes){
		if(null==bytes || 0==bytes.length){
			return true;
		}
		return false;
	}
}
